// File: entity/ChapterInfo.cpp
#include "chapterinfo.h"

ChapterInfo::ChapterInfo(QObject *parent) : QObject(parent) {}

// Getter实现
QString ChapterInfo::getId() const { return id;}
QString ChapterInfo::getNovelId() const { return novelId;}
QString ChapterInfo::getTitle() const { return title;}
int ChapterInfo::getChapterIndex() const { return chapterIndex;}
QString ChapterInfo::getPath() const { return path;}
int ChapterInfo::getWordCount() const { return wordCount;}
int ChapterInfo::getStartOffset() const { return startOffset;}
int ChapterInfo::getEndOffset() const { return endOffset;}
QString ChapterInfo::getPrevChapter() const { return prevChapter;}
QString ChapterInfo::getNextChapter() const { return nextChapter;}
int ChapterInfo::getLoadStatus() const { return loadStatus;}
int ChapterInfo::getStatus() const { return status;}

// Setter实现
void ChapterInfo::setId(const QString &m_id) { id = m_id; }
void ChapterInfo::setNovelId(const QString &m_novelId) { novelId = m_novelId; }
void ChapterInfo::setTitle(const QString &m_title) { title = m_title; }
void ChapterInfo::setChapterIndex(int m_chapterIndex) { chapterIndex = m_chapterIndex; }
void ChapterInfo::setPath(const QString &m_path) { path = m_path; }
void ChapterInfo::setWordCount(int m_wordCount) { wordCount = m_wordCount; }
void ChapterInfo::setStartOffset(int m_startOffset) { startOffset = m_startOffset; }
void ChapterInfo::setEndOffset(int m_endOffset) { endOffset = m_endOffset; }
void ChapterInfo::setPrevChapter(const QString &m_prevChapter) { prevChapter = m_prevChapter; }
void ChapterInfo::setNextChapter(const QString &m_nextChapter) { nextChapter = m_nextChapter; }
void ChapterInfo::setLoadStatus(int m_loadStatus) { loadStatus = m_loadStatus; }
void ChapterInfo::setStatus(int m_status) { status = m_status; }

QString ChapterInfo::toString() const {
    return QString("ChapterInfo{")
        + "id='" + id + "', "
        + "novelId='" + novelId + "', "
        + "title='" + title + "', "
        + "chapterIndex=" + QString::number(chapterIndex) + ", "
        + "path='" + path + "', "
        + "wordCount=" + QString::number(wordCount) + ", "
        + "startOffset=" + QString::number(startOffset) + ", "
        + "endOffset=" + QString::number(endOffset) + ", "
        + "prevChapter='" + prevChapter + "', "
        + "nextChapter='" + nextChapter + "', "
        + "loadStatus=" + QString::number(loadStatus) + ", "
        + "status=" + QString::number(status) + "}";
}
